﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WW.NActiveRecord.Internal.Utils
{
    internal static class StringExt {

        internal static string JoinString<T>(this IEnumerable<T> self) {
            return self.JoinString(",");
        }
        internal static string JoinString<T>(this IEnumerable<T> self, string separator) {
            return self.JoinString(separator, x => x.ToString());
        }
        internal static string JoinString<T>(this IEnumerable<T> self, string separator, Func<T, string> selector) {
            return string.Join(separator, self.Select(selector).ToArray());
        }
    }
}